
Page({
  data: {
    prenext: "../Cooperation/Cooperation",
    preprve: "../Business2/Business",
    page: 9,
    src: '',
    cptitle: {
      
      zw: "联系我们",
      yw: "Contact Us"
    },
    startpoint: [],
    movePoint: [],
    opacitycontainer: {},

    markers: [{
      iconPath: "./location.png",
      id: 0,
      latitude: 29.613671,
      longitude: 106.515852,
      width: 45,
      height: 45,
      callout:{
        content:"重庆市渝北区财富大厦b座",
        color: "#192d82",
        fontSize: "14",
        borderRadius: "10",
        bgColor: "#ffffff",
        padding: "5",
        display: "ALWAYS"

      }
    }],
  },
  makePhoneCall:function(){
    wx.makePhoneCall({
      phoneNumber:"15310329351",
    })
  },
  touchstartfun: function (e) {
    var that = this;
    //开始触摸，获取触摸坐标
    that.setData({
      startpoint: [e.touches[0].pageX, e.touches[0].pageY]
    });
  },
  touchmovefun: function (e) {
    //触摸移动中，获取触摸坐标
    var that = this;
    that.setData({
      movePoint: [e.touches[0].pageX, e.touches[0].pageY]
    });
    var startY = this.data.startpoint[1];
    var moveY = this.data.movePoint[1];
  
  },
  touchendfun: function (e) {
    var that = this;
    var startY = this.data.startpoint[1];
    var moveY = this.data.movePoint[1];
    if (startY - moveY > 80) {
      wx.reLaunch({
        url: that.data.prenext
      })
    }
    else if (startY - moveY < -80) {
      wx.reLaunch({
        url: that.data.preprve
      })
    }
  },
  onLoad: function () {
    var that = this;

  },
onReady:function(){
  this.setData({
    bg1leftstyle: "bg1leftstyle",
    bg2leftstyle: "bg2leftstyle",
    bgotstyle: "bgotstyle",
    bgotimgstyle: "bgotimgstyle",
    line2style: "line2style",
    styleArr: ["titemstyle2", "titemstyle3","titem1style"],
    bottomdata: {
      page: 7,
      styleArr: ["bottomstyleArr1", "bottomstyleArr2", "viewstyleArr"]
    },
    cptitle: {
      cptitlestyle: "cptitlestyle",
      zw: "联系我们",
      yw: "Contact Us"
    },
  })
}
})